#define layout()
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>我的奖品</title>
    <link rel="stylesheet" href="../wx/choujianng/award/css/style.css">
    <style>
        html{ background-color: #fff; }
    </style>
</head>
<body>
    <div class="awaedTitle"> 我的奖品 </div>

    <div class="awardShow">
        <p>我的卡卷</p>
        
    </div>
</body>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script>
    {
        // isLost: 0--可使用， 1--已使用， 2---已失效 
       /*  var array = [
            { prize: '五元喵卷', isLost: 0, type: '限食品类', sTime: '2018-06-03', eTime: '2018-06-05' },
            { prize: '神秘礼物', isLost: 1, type: '限食品类', sTime: '2018-06-03', eTime: '2018-06-05' },
            { prize: 'iPoneX', isLost: 2, type: '限食品类', sTime: '2018-06-03', eTime: '2018-06-05' }
        ]; */
        console.log(#(partyPrizeRecords));
        var array = #(partyPrizeRecords);

        for(var i = 0; i < array.length; i++){
            var prize = array[i].prize_name;
            var isLost = array[i].islost;
            //var type = array[i].type;
            var tmm_ticket_code = array[i].tmm_ticket_code;
            //var eTime = array[i].eTimepartyPrizeRecords;

            getaward(prize, isLost, tmm_ticket_code);
        }

    }

    function getaward(prize, isLost,tmm_ticket_code){
        var awardContent = ''
         console.log(isLost);
        if(isLost == 0){
            console.log(111);
            awardContent = '<div class="awardShowBox">' +
                                '<img src="../wx/choujianng/award/img/able.png" alt="">' +
                                '<div class="awardContent">' +
                                    '<div class="awardTop">' +
                                        '<p> '+ prize +' </p>' +
                                        '<p class="userAward">  </p>' +
                                    '</div>' +
                                    '<div class="awardInfo">' +
/*                                         '<p> '+ type +' </p>' +
 */                                        '<p> 券号： '+tmm_ticket_code +' </p>' +
                                    '</div>' +
                                '</div>' +
                            '</div>';
        }else if(isLost == 1){
            awardContent = '<div class="awardShowBox lost">' +
                                '<img src="../wx/choujianng/award/img/lostBox.png" alt="">' +
                                '<div class="awardContent">' +
                                    '<div class="awardTop">' +
                                        '<p> '+ prize +' </p>' +
                                     /*    '<p> 立即使用 </p>' + */
                                    '</div>' +
                                    '<div class="awardInfo">' +
/*                                         '<p> '+ type +' </p>' +
 */                                        '<p> 券号： '+tmm_ticket_code +' </p>' +
                                    '</div>' +
                                    '<div class="lostBox">' +
                                        '<img src="../wx/choujianng/award/img/used.png" alt="">' +
                                    '</div>' +
                                '</div>' +
                            '</div>';
        }else if(isLost == 2){
            awardContent = '<div class="awardShowBox lost">' +
                                '<img src="../wx/choujianng/award/img/lostBox.png" alt="">' +
                                '<div class="awardContent">' +
                                    '<div class="awardTop">' +
                                        '<p> '+ prize +' </p>' +
/*                                         '<p> 立即使用 </p>' +
 */                                    '</div>' +
                                    '<div class="awardInfo">' +
/*                                         '<p> '+ type +' </p>' +
 */                                       '<p> 券号： '+tmm_ticket_code +' </p>' +
                                    '</div>' +
                                    '<div class="lostBox">' +
                                        '<img src="../wx/choujianng/award/img/lost.png" alt="">' +
                                    '</div>' +
                                '</div>' +
                            '</div>';
        }
        
        $('.awardShow').append(awardContent);
    }


    {
        // 立即使用
        $('.userAward').on('click', function(){
            alert('立即使用');
        })
    }
</script>
</html>
   #end
#@layout()